]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
runDialog: Remove "Run" button again
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 30 Oct 2012 14:00:07 +0000 (15:00 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 30 Oct 2012 14:50:05 +0000 (15:50 +0100)
While not in the mockups, it was introduced during review of commit
0c807bddaf4da5 after discussion on IRC, but the designers disagree;
remove it again.

https://bugzilla.gnome.org/show_bug.cgi?id=687127

js/ui/runDialog.js

index 2ec1deaf5fda521fc4551552413957537b61419f..ac3f0901f8b1a8d80dfd7e4da87cd3789a446e13 100644 (file)
@@ -238,14 +238,8 @@ const RunDialog = new Lang.Class({
         this._errorBox.hide();
 
         this.setButtons([{ action: Lang.bind(this, this.close),
-                           label: _("Cancel"),
-                           key: Clutter.Escape },
-                         { action: Lang.bind(this,
-                               function() {
-                                   this._activate(false);
-                               }),
-                           label: _("Run"),
-                           isDefault: true }]);
+                           label: _("Close"),
+                           key: Clutter.Escape }]);
 
         this._pathCompleter = new Gio.FilenameCompleter();
         this._commandCompleter = new CommandCompleter();
@@ -256,7 +250,13 @@ const RunDialog = new Lang.Class({
         this._entryText.connect('key-press-event', Lang.bind(this, function(o, e) {
             let symbol = e.get_key_symbol();
             if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) {
-                this._activate(e.get_state() & Clutter.ModifierType.CONTROL_MASK);
+                this.popModal();
+                this._run(o.get_text(),
+                          e.get_state() & Clutter.ModifierType.CONTROL_MASK);
+                if (!this._commandError ||
+                    !this.pushModal())
+                    this.close();
+
                 return true;
             }
             if (symbol == Clutter.slash) {
@@ -291,14 +291,6 @@ const RunDialog = new Lang.Class({
         }));
     },
 
-    _activate: function(inTerminal) {
-        this.popModal();
-        this._run(this._entryText.get_text(), inTerminal);
-        if (!this._commandError ||
-            !this.pushModal())
-            this.close();
-    },
-
     _getCompletion : function(text) {
         if (text.indexOf('/') != -1) {
             return this._pathCompleter.get_completion_suffix(text);